<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp"%>
<html>
<head>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
	//参与类型
	var participantTypeCode="";
	//客户类型
	var customerTypeCode="";
	//个人信息ID
	var participantID="";
	//客户ID
	var clientID="";



	function changeID(ctc,ptc,iid,cid){
		participantTypeCode=ptc;
		customerTypeCode=ctc;
		participantID=iid;
		clientID=cid;
	}

	function openDetail(){
		var url = null;
		if(customerTypeCode=='001'){//owner
			url = "${ctx}/customer_ownerAction.do?method=initOwnerDetailMain&curParticipantTypeCode=" + participantTypeCode+"&curParticipantId="+participantID;
			top.windowOpen(url,"ownerDetail","业主详细信息",610,900,true,"ownerDetail");
		}else if(customerTypeCode=='002'){
			url = "${ctx}/customer_lesseeAction.do?method=initLesseeDetailMain&participantTypeCode=" + participantTypeCode+"&participantId="+participantID;
			top.windowOpen(url,"lesseeDetail","租户详细信息",610,900,true,"lesseeDetail");
		}else{
			Alert("请选择一条记录！");
		}
	}

	function resize(){
		parent.window.document.all('houseMainLinePanel').height=document.body.scrollHeight;

	}

</script>

</head>
<body onload="resize();">
<div style="overflow:auto; height:280px;">
<ec:ceTable items="customerList"
	action="${ctx}/houseMainLin_houseMainLineAction.do?method=queryCustomerInfo"
	var="customerItem"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="10" >
	<ec:ceRow styleClass="grid" onclick="changeID('${customerItem.customerTypeCode}','${customerItem.participantTypeCode}','${customerItem.individualID}','${customerItem.clientID}');"
	ondblclick="openDetail();return false;">
		<ec:ceColumn headerCell="pmsHeadrCell" title="姓名" property="customerName" sortable="true" width="9%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="住户类型" property="customerType" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件类型" property="idType" width="9%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="证件号码" property="idNO" width="8%" styleClass="align_left"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="联系电话" property="telephone" width="9%" styleClass="align_left"/>
	</ec:ceRow>
	<ec:parameter name="houseIds" value="${HouseIds}"></ec:parameter>
</ec:ceTable>
</div>

</body>
</html>